package com.tuanzi.loan.core.entity;

import javax.persistence.Column;
import javax.persistence.EntityListeners;
import javax.persistence.MappedSuperclass;
import javax.validation.constraints.NotNull;

import org.hibernate.validator.constraints.Length;
import org.springframework.data.jpa.domain.support.AuditingEntityListener;

import lombok.Data;
import lombok.EqualsAndHashCode;

/**
 * @author Ray 2017/09/21
 */
@Data
@MappedSuperclass
@EqualsAndHashCode(callSuper = true)
@EntityListeners(AuditingEntityListener.class)
public abstract class UUIDBaseEntity extends UUIDAuditEntity {

    private static final long serialVersionUID = 7550766086746707203L;

    @NotNull
    @Column(name = "ENABLE")
    private Boolean enable = true;

    @Length(max = 500)
    @Column(name = "REMARK")
    private String remark;

}
